$(document).ready(function(){
	var validator = $("#frmChangePassword").validate({
		errorElement:'div',
		rules: {
			cpassword: {
				required: true,
				maxlength: 16,
				minlength:5
			},
			npassword: {
				required: true,
				maxlength: 16,
				minlength:5
			},
			confirmpassword: {
				required: true,
				equalTo: "#npassword"
			}
		},
		messages: {
			cpassword: {
				required: "Enter your current password",
				maxlength: jQuery.format("Enter at most {0} characters"),
				minlength: jQuery.format("Enter at most {0} characters")		
			},	
			npassword: {
				required: "Enter your new password",
				maxlength: jQuery.format("Enter at most {0} characters"),
				minlength: jQuery.format("Enter at most {0} characters")
			},
			confirmpassword: {
				required: "Enter confirm password",
				equalTo: "Confirm password should be same as password"
				
			}
		}
	});
});